package com.wq.goods.controller;


import com.wq.goods.model.GoodsSku;
import com.wq.common.base.ApiResponse;
import com.wq.goods.service.GoodsSkuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wqc
 * @since 2021-09-30
 */
@RestController
@RequestMapping("//goodsSku")
public class GoodsSkuController {

    @Autowired
    private GoodsSkuService goodsSkuService;

    @GetMapping(value = "/getSkuInfo/{skuId}")
    @ResponseBody
    public ApiResponse getSkuInfo(@PathVariable("skuId") Long skuId) {
        GoodsSku skuInfo = goodsSkuService.getById(skuId);
        return ApiResponse.builder().data(skuInfo).build();
    }

}
